<template>
	<view class="smart-page">
		<view class="smart-page-head">
			<view class="smart-page-head-title">audio音频</view>
		</view>
		<view>
			<button type="primary" @click="play()">播放</button>
			<audio id="myaudio" name="我爱你,祖国" controls="true" poster="../../static/logo.png"
			author='贝多芬' src=""
			></audio>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onReady: function(){
			this.audioContext=uni.createAudioContext("myaudio");
		},
		methods: {
			play(){
				this.audioContext.play();
			},
			pause(){
				this.audioContext.pause();
			}
		}
	}
</script>

<style>

</style>
